package com.amkai.aes.webservice.binary.objecthandler.rcm;

import java.io.Serializable;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import com.amkai.aes.aescommon.service.ddm.DDMJob;
import com.amkai.aes.aescommon.service.ddm.DDMResult;
import com.amkai.aes.aescommon.service.rcm.RCMJob;
import com.amkai.aes.aescommon.service.rcm.RCMResult;
import com.amkai.aes.server.ddm.DDMProvider;
import com.amkai.aes.server.rcm.RCMProvider;
import com.amkai.aes.webservice.binary.JobObjectHandler;

public class RCMHandler implements JobObjectHandler<RCMJob, Serializable, RCMResult> {
	private static final Log logger = LogFactory.getLog(RCMHandler.class);
	
	public RCMResult process(RCMJob job, Serializable object) throws Exception {
		RCMProvider mp = new RCMProvider();
		try {
			return mp.processJob(job, object);
		} catch (Throwable e) {
			logger.error("RCMHandler: ", e);
			throw new Exception(e);
		}
	}

}
